package com.hotelvip.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * 通过此对象封装从数据库查询到的用户信息
 * @author Lzh
 * @date 2020/11/27 14:46
 */

@Data
@TableName("sys_users")
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "sys_user对象",description = "用户对象SysUser")
public class SysUser extends BasePojo{
	private static final long serialVersionUID = -1786445329906400433L;
	@TableId(type = IdType.AUTO)
	@ApiModelProperty(value = "用户id",name = "id")
	private Integer id;
	@ApiModelProperty(value = "用户名",name = "username",example = "laowang")
	private String username;
	@ApiModelProperty(value = "密码",name = "password",example = "admin")
	private String password;//md5
	private String salt;//盐值
	@ApiModelProperty(value = "邮箱",name = "email",example = "xiaoming@gmail.com")
	private String email;
	@ApiModelProperty(value = "手机号",name = "mobile",example = "13888888888")
	private String mobile;
	@ApiModelProperty(value = "状态",name = "status",example = "1")
	private Integer status=1;
//  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
//	private Date createdTime;
//	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
//	private Date updatedTime;//修改时间
	private String createdUser;
	@ApiModelProperty(value = "修改的用户",name = "updatedUser")
	private String updatedUser;//修改人
	@ApiModelProperty(value = "角色id数组用于添加",name = "roleIds")
	@TableField(exist = false)
	private Long[] roleIds;

	@ApiModelProperty(value = "酒店店号",name = "hotelNum")
	private Integer hotelNum;

}
